class CreateDepreciations < ActiveRecord::Migration
  def self.up
    create_table :depreciations do |t|
       t.column :description, :string
       t.column :live_years, :integer
       t.column :code, :string
       t.column :compensation,:string
   end
    execute "INSERT INTO depreciations(id,description,live_years,code,compensation)  VALUES ('','CONSTRUCCIONES Y EDIFICACIONES',20,'1516','159205')"   
    execute "INSERT INTO depreciations(id,description,live_years,code,compensation)  VALUES ('','MAQUINARIA Y EQUIPO',10,'1520','159210')" 
    execute "INSERT INTO depreciations(id,description,live_years,code,compensation)  VALUES ('','EQUIPOS DE OFICINA',3,'1524','159215')" 
    execute "INSERT INTO depreciations(id,description,live_years,code,compensation)  VALUES ('','EQUIPOS DE COMPUTACION Y COMUNICACION',3,'1528','159220')"
    execute "INSERT INTO depreciations(id,description,live_years,code,compensation)  VALUES ('','FLOTA Y EQUIPO DE TRANSPORTE',5,'1540','159235')"
    execute "INSERT INTO depreciations(id,description,live_years,code,compensation)  VALUES ('', 'MUEBLES Y ENSERES', 10, '152405', NULL)"
    execute "INSERT INTO depreciations(id,description,live_years,code,compensation)  VALUES ('', 'EQUIPOS DE PROCESAMIENTO DE DATO', 3, '152805', NULL)"
  end

  def self.down
    drop_table :depreciations
  end
end
